package cn.edu.zafu.bigdata.YinMingyan.chapter05;

import java.util.Map;

/**
 * Test class for the StudentGradeManager class.
 */
public class StudentGradeManagerTest {

    /**
     * Tests adding, retrieving, and removing student grades.
     */
    public static void main(String[] args) {
        StudentGradeManager manager = new StudentGradeManager();

        // Add students
        manager.addStudent("Joy", 98);
        manager.addStudent("Bob", 85);
        manager.addStudent("Charlie", 95);

        // Retrieve and print grades
        System.out.println("Joy's grade is: " + manager.getGrade("Joy")); // Expected output: 90
        System.out.println("Bob's grade is: " + manager.getGrade("Bob")); // Expected output: 85
        System.out.println("Charlie's grade is: " + manager.getGrade("Charlie")); // Expected output: 88
        System.out.println("David's grade is: " + manager.getGrade("David")); // Expected output: -1 (not found)

        // Remove a student
        manager.removeStudent("Bob");
        System.out.println("Bob's grade after removal: " + manager.getGrade("Bob")); // Expected output: -1 (removed)
    }
}
